home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
WINPROGS
/
WPJV1N7.ZIP
/
RTFGEN.ZIP
/
RTFGEN
< prev
next >
Wrap
Text File
|
1992-02-23
|
20KB
|
693 lines
\docstart
\title Contents`
\topic contents`
\keyword contents`
\browse general:004`
\b
==========
\b Contents`
[Overview:overview]`
[General Editing Considerations:EditingConsiderations]`
[RTFGEN Defaults:Defaults]`
[Steps for Building a Help File:basicsteps]`
[ASCII Input File Layout:layout]`
[Commands:Commands]`
[References:References]`
[Copyright:Copyright]`
----------
\topic Commands`
\title Commands`
\keyword commands`
\browse general:030`
========
\b Commands`
[Command Syntax:CommandSyntax]`
RTFGEN Commands`
[Topic Header Commands:TopicHeaderCommands]`
[Cross Reference Commands:CrossReferences]`
[Definitions:Definitions]`
[Bitmap Commands:BitmapCommands]`
[Block Formatting Commands:BlockFormatting]`
RTF Commands`
[Font Commands:FontCommands]`
[Paragraph Commands:ParagraphCommands]`
[Tabbing Commands:TabbingCommands]`
------
\title Overview`
\topic overview`
\browse general:005`
===========
\b Overview`
Normally, to create a help file with the Windows help compiler,
you must first write a help topic file using a Rich Text Format (RTF)
word processor. For many, there are two problems here:`
\blockstart \li500\fi-240`
1. RTF word processors are expensive.`
2. Learning to use a new word processor is a nuisance and not
very productive.`
\blockend
RTFGEN solves both these problems by allowing you to use your favorite
ASCII text editor to produce RTF formatted files acceptable to the
help compiler.`
--------------
\title General Editing Considerations`
\topic EditingConsiderations`
\keyword special characters;tabs`
\keyword comments`
\browse general:010`
========
\b General Editing Considerations`
Almost any ASCII editor may be used. I use Borland's TURBO or
TPW. It's probably best to turn off options like 'optimal fill'
which can leave invisible and possibly unknown tab characters in the
document.`
The use of tabs is required to obtain column allignment with
proportional fonts. Either the tab character or the RTF command,
[\\tab:TabbingCommands], may be used with the same effect.
The \\tab has the advantage
that it's visible in your ASCII file.`
RTFGEN and/or the RTF language have special use for the following
characters:`
\blockstart \li1200\tx1200\fi-840`
{\b\`} (grave accent) Used to mark end of paragraphs.`
{\b\[}, {\b\]} Used to mark jumps and definitions.`
{\b\{}, {\b\}} Used to mark areas where font characteristics will change.`
{\b\\} Used as a command start character.`
\blockend
When these characters are to be used in the text, they should be
preceded by a '\\'. Thus, '\\\[' will cause the left bracket to be
inserted in text and '\\\\' will result in a single backslash being
inserted in text.`
( * . . . * ) may be used to insert comments within the text.`
--------
\title RTFGEN Defaults`
\topic Defaults`
\keyword defaults`
\browse general:015`
=======
\b RTFGEN Defaults`
Helv, 10 point font.`
Paragraphs are left justified. The first line is not
indented.`
Paragraph indentation is set by indentation of the first
line of the paragraph.`
Tabs are spaced every 720 [[twips:twipdef]] (about 6 default
characters).`
Any of these defaults may be changed globally for the whole
document, or locally at the topic, paragraph, or even character level.`
---------
\title Steps for Building a Help File`
\topic basicsteps`
\keyword steps for building a help file;building a help file`
\browse general:020`
=========
\b Steps for Building a Help File`
The steps required to create a Windows help file using RTFGEN
are:`
\blockstart \li600\fi-240`
1. Using an ASCII editor, create one or more input text files.
[See input file layout:layout]`
2. Use RTFGEN to convert these files to RTF files.`
3. Create a Help Project File (.HPJ) for input to the help
compiler. This file should reference the RTF files.`
4. Run the help compiler to make the help file.`
\blockend
Steps 3 and 4 are described in the help compiler documentation.
This documentation deals with the first two steps only.`
Once the ASCII files have been written, RTFGEN is used to
convert them to suitable RTF format. The file, [[HEADING:headingDef]],
must be present on the default drive. From the DOS prompt:`
RTFGEN \[Infile \[Outfile\]\]`
The optional filenames specify the names of the ASCII input file
and the RTF file to be generated. If no extensions are given,
.RTF is used by default for the output file. If the output
filename is missing from the command line, an RTF file will be
created using the same name as the source file. When neither
filename is specified, names will be requested once execution
starts.`
RTFGEN MYHELP`
will cause RTFGEN to look for a source file, MYHELP and create an
object file, MYHELP.RTF.`
-----------
\title HEADING File`
\topic headingDef`
\keyword HEADING`
========
The file, HEADING, is copied to the start of each RTF file generated.
Along with some boilerplate RTF commands, it contains the font table
defining fonts by number.`
--------
\title ASCII Input File Layout`
\topic layout`
\keyword layout;ASCII input file layout;input file layout`
\browse general:025`
\li600\brdrl\brdrr\ri600\sb-50\sa-50 (*general paragraph stuff for whole topic*)
==========
\pard\b RTFGEN ASCII Input File Layout`
\brdrt\qc {\fs16 [document header:doc_header]} `
\b[[\\docstart:docstartDef]]{\fs30 }` (*space of larger font gives more height *)
\qc {\fs16 [topic header:topicHeader]} `
===========[[==:EqualDef]]`
`
\qc\fs16 [topic text:TopicText]`
`
- - - - - - - - - - - [[- -:HyphenDef]]`
\blockstart \li600`
. . . . . .`
\blockend
\qc \fs16 [topic header:TopicHeader]`
===========[[==:EqualDef]]`
`
\qc\fs16 [topic text:TopicText]`
`
- - - - - - - - - - - [[- -:HyphenDef]]`
\brdrb\b [[\\docend:DocendDef]]`
------------
\topic TwipDef`
======
TWIP: A 20th of a point. For our purposes, 1440 twips per inch.
One 10 point character is about 120 twips wide.`
------
\topic EndofParaDef`
======
A grave accent, '{\b\`}', is used to mark paragraph ends.`
-----
\topic DocstartDef`
=========
The command, \\docstart, marks the end of the document header and the
start of the topics.`
-----------
\topic DocendDef`
========
The command, \\docend, marks the end of the document.`
----------
\topic EqualDef`
\title Start of Topic Text Marker`
\keyword ========`
=========
\b Start of Topic Text Marker`
A row of 5 or more '='s starting in column 1 marks the end of a topic header
and the start of the topic text.`
-------
\topic HyphenDef`
\title End of Topic Marker`
\keyword - - - - - - -;formfeed`
======
\b End of Topic Marker`
A row of 5 or more hyphens starting in column 1 marks the end of a topic.`
An optional formfeed or several blank lines may follow the row of hyphens
to better format your ASCII file.`
--------
\title Document Header`
\topic Doc_Header`
\keyword document header;\\docstart`
============
\b Document Header`
The optional document header may contain commands to overide the
[[RTFGEN defaults:defaults]]. Commands
changing the font, font size, or paragraph first line indent might be
appropriate here.`
The \\docstart command follows the document header to mark the start of
the topics.`
Example:`
\\f0 \\fs24 ( * Times Roman font, 12 pitch for entire help file * )`
\\docstart`
------------
\title Topic Header`
\topic TopicHeader`
\keyword topic header`
===========
\b Topic Header`
The topic header contains commands defining build tags, context
strings, title, keywords, and browse sequence number as appropriate for the
topic. Topic global formatting commands may also be included.
The topic header section is terminated with a row of 5 or more
'='s.`
Example:`
\\title Table of Contents\``
\\topic contents\``
\\keyword contents\``
\\f0 \\fs24 ( * Times Roman font, 12 pitch for this topic * )`
============ ( * end of topic header * )`
\b